<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        .container{
            width:500px;
            height:500px;
            background-color: rgb(43, 211, 226);
            display: flex;
            /* 翻转 */
            flex-direction:row;
            justify-content:center;
            align-items:center;

       
        }
        .box1{
            width:100px;
            height:100px;
            background-color: red;
            /* 权重 */
            /* 一旦设置flex属性，width就不生效了 */
            flex:2;
        }
        .box2{
            width:100px;
            height:100px;
            background-color: green;
            flex:3;
        }
       .box3{
            width:100px;
            height:100px;
            background-color: blue;
            flex:1;
        }

    </style>
</head>
<body>
    <div class="container">
        <div class="box1"></div>
        <div class="box2"></div>
        <div class="box3"></div>

    </div>

</body>
</html>